import request from "@/utils/request";
export const Login = (data) => {
  return request({
    url: "/v1_0/authorizations",
    method: "post",
    data,
  });
};

// 请求验证码
export const Sms = (data) => {
  return request({
    url: "/v1_0/sms/codes/" + data,
    method: "get",
  });
};

// 获取用户资料
export const getUserInfo = () => {
  return request({
    url: "/v1_0/user",
    // headers: {
    //   // 注意：该接口需要授权才能访问
    //   //       token的数据格式：Bearer token数据，注意 Bearer 后面有个空格
    //   Authorization: `Bearer ${store.state.user.token}`
    // }
  });
};
